package my.mall.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author fengbo
 * @since 2024-04-22
 */
@TableName("mall_goods_sku")
class GoodsSku {

    /**
     * sku主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    var id: Long? = null

    /**
     * 数据新建时间
     */
    var createdTime: LocalDateTime? = null

    /**
     * 数据更新时间
     */
    var updatedTime: LocalDateTime? = null

    /**
     * Sku图片
     */
    var skuImgUrl: String? = null

    /**
     * 商品主键
     */
    var goodsId: Long? = null

    /**
     * 规格的id组合-下划线分隔
     */
    var specIds: String? = null

    /**
     * 商品的规格详情-JSON格式
     */
    var specDetail: String? = null

    /**
     * 当前库存数量
     */
    var stockNum: Int? = null

    /**
     * sku价格-单位分
     */
    var skuPrice: Int? = null

    /**
     * 商品重量-单位千克
     */
    var goodsWeight: Double? = null

    /**
     * 0-有效 1-失效
     */
    var skuStatus: Byte? = null

    companion object {

        const val ID : String = "id"


        const val CREATED_TIME : String = "created_time"


        const val UPDATED_TIME : String = "updated_time"


        const val SKU_IMG_URL : String = "sku_img_url"


        const val GOODS_ID : String = "goods_id"


        const val SPEC_IDS : String = "spec_ids"


        const val SPEC_DETAIL : String = "spec_detail"


        const val STOCK_NUM : String = "stock_num"


        const val SKU_PRICE : String = "sku_price"


        const val GOODS_WEIGHT : String = "goods_weight"


        const val SKU_STATUS : String = "sku_status"

    }

    override fun toString(): String {
        return "GoodsSku{" +
        "id=" + id +
        ", createdTime=" + createdTime +
        ", updatedTime=" + updatedTime +
        ", skuImgUrl=" + skuImgUrl +
        ", goodsId=" + goodsId +
        ", specIds=" + specIds +
        ", specDetail=" + specDetail +
        ", stockNum=" + stockNum +
        ", skuPrice=" + skuPrice +
        ", goodsWeight=" + goodsWeight +
        ", skuStatus=" + skuStatus +
        "}"
    }
}
